Skip to main content

SetStackPolicy

Description

call the SetStackPolicy interface to set the resource stack policy.

Request Method

POST

Request Path

/apsara/route/ROS/SetStackPolicy

Request Parameters Common Parameters

NameLocationTypeRequiredSample valueDescription
regionIdBODYstringYesNo sample value for this parameter.region id
RegionIdBODYstringYescn-hangzhouthe region ID to which the resource stack belongs.
StackPolicyBodyBODYstringNo{"Statement":[{"Effect":"Allow","Action":"Update:*","Principal":"*","Resource":"*"}]}contains the structure of the resource stack policy body, with a length of 1~16,384 bytes. Description You must specify the parameter StackPolicyBody or StackPolicyURL, but you cannot specify both.
StackPolicyURLBODYstringNooss://ros/stack-policy/demothe location of the file containing the resource stack policy. The URL must point to a policy located in a Web server (HTTP or HTTPS) or Aliyun OSS bucket (for example, oss:// ros/stack-policy/demo, oss:// ros/stack-policy/demo?RegionId = cn-hangzhou). The maximum length of the policy file is 16 and 384 bytes. If the OSS region is not specified, the default RegionId is the same as the interface parameter. description you must specify the parameter StackPolicyBody or StackPolicyURL, but not at the same time. The maximum length of the URL is 1350 bytes.
versionBODYstringNo2016-01-01version of api
StackIdBODYstringYes4a6c9851-3b0f-4f5f-b4ca-a14bf691****resource stack ID.

Return data

NameTypeSample valueDescription
RequestIDstring1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DCRequest id

Example

Successful Response example

{
"RequestID":"1E3D5A1E0-67CA-43DA-24BC-EAF2D5A1E4DC"
}

Failed Response example

{
"errorSample":
{
"resultCode":-1,
"resultMsg":"system error",
"result":null
}

}